void allocateMemory() {

	hAtom = (float3*) malloc(nMolecules*3*sizeof(float3));
	h2body = (prec*) malloc(nMolecules*sizeof(prec)); 

	dCM = (float3*) malloc(nMolecules*3*sizeof(float3));
	refConfig = (float3*) malloc(nMolecules*3*sizeof(float3));

	cudaMalloc(&dAtom, nMolecules*3*sizeof(float3)); 
	cudaMalloc(&d2body, nMolecules*sizeof(prec)); 

}

void freeMemory() {

	free(hAtom);
	free(h2body); 
	free(dCM);
	free(refConfig);

	cudaFree(dAtom);
	cudaFree(d2body);
}

